import request from '@/utils/request'
var group_name = 'comment'
export default {
  save(comment) { // 添加
    return request({
      url: `/${group_name}/save`,
      method: 'post',
      data: comment
    })
  },
  commentGoods(commentGoods) { // 点赞
    return request({
      url: `/${group_name}/commentGoods`,
      method: 'put',
      data: commentGoods
    })
  },
  getListByBlogId(comment) { // 获取博客的评论
    return request({
      url: `/${group_name}/getListByBlogId/${comment}`,
      method: 'get'
    })
  },
  getByPage(page) { // 分页查询
    return request({
      url: `/${group_name}/getByPage`,
      method: 'post',
      data: page
    })
  },
  delete(id) { // 分页查询
    return request({
      url: `/${group_name}/delete/${id}`,
      method: 'delete'
    })
  }
}
